# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-flask-pymongo
pkgname=('python2-flask-pymongo' 'python-flask-pymongo')
_pkgname=Flask-PyMongo
pkgver=3.0.1
_pyver=3.13
pkgrel=1
pkgdesc='PyMongo support for Flask applications.'
arch=('any')
url='https://pypi.python.org/pypi/Flask-PyMongo/'
license=('BSD')
makedepends=('python2-setuptools' 'python-setuptools' 'python2-wheel'
             'python-wheel' 'python2-pip' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('0d61c745b9df44c3c34fad229fa2603be34feee1509fd16dc60c879e24d35d9f40b000b24391b702b7cf68365af3af9afc86600f58348d917c2bda89143186e7')

package_python2-flask-pymongo() {
  depends=('python2' 'python2-flask')

  cd "$_pkgname-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" -O1

  rm -rf "$pkgdir/usr/lib/python2.7/site-packages/tests"
}


package_python-flask-pymongo() {
  depends=('python' 'python-flask')

  cd "$_pkgname-$pkgver"

  python setup.py install --prefix=/usr --root="$pkgdir" -O1

  rm -rf "$pkgdir/usr/lib/python$_pyver/site-packages/tests"
}

